One - One Code All

Blog Content

flask获取本页面网址request.url

Python   2014-04-13 17:44:59


flask获取本页面网址 request.url, request.url_root 


eg.  http://www.example.com/myapplication/page.html?x=y


In this case the values of the above mentioned attributes would be the following:


request.path         /page.html

request.script_root  /myapplication

request.base_url     http://www.example.com/myapplication/page.html

request.url          http://www.example.com/myapplication/page.html?x=y

request.url_root     http://www.example.com/



上一篇:SMA均线
下一篇:flask的request模块的属性参考

The minute you think of giving up, think of the reason why you held on so long.